<html xmlns="http://www.w3.org/1999/xhtml">
   <head>
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
      <title>16. Data input</title>
      <meta charset="utf-8" />
      <meta name="generator" content="DocBook XSL 2.0 Stylesheets V2.5.0" />
      <link href="css/default.css" rel="stylesheet" type="text/css" />
      <link href="css/db-prism.css" rel="stylesheet" type="text/css" />
      <link rel="stylesheet" href="css/xproc.css" type="text/css" /><script type="text/javascript" src="js/dbmodnizr.js"></script></head>
   <body>
      <div class="page">
         <div class="content">
            <div xmlns:tmpl="http://docbook.org/xslt/titlepage-templates" class="navheader">
               <table border="0" cellpadding="0" cellspacing="0" width="100%" summary="Navigation table">
                  <tr>
                     <td align="left"> <a title="XML Calabash Reference" href="index.html"><img src="img/home.png" alt="Home" border="0" /></a> <a href="cfg.input.html" title="15 .  Input"><img src="img/prev.png" alt="Prev" border="0" /></a> <a title="Chapter  4 .  Configuration" href="configuration.html"><img src="img/up.png" alt="Up" border="0" /></a> <a title="17 .  Output" href="cfg.output.html"><img src="img/next.png" alt="Next" border="0" /></a></td>
                     <td align="right"><i>XML Calabash Reference</i> (Version 0.28)</td>
                  </tr>
               </table>
            </div>
            <div class="body">
               <section id="cfg.data-input" class="section">
                  <div class="section-titlepage">
                     <h2>16. Data input</h2>
                  </div>
                  <div class="content">
                     <p>There are two ways to specify a non-XML input binding in the configuration:</p>
                     <figure id="cfg.data-input.3" class="informaltable-wrapper cfgprop">
                        <div class="informaltable cfgprop">
                           <table border="0" style="border-collapse: collapse;">
                              <colgroup>
                                 <col class="tcol1" />
                                 <col class="tcol2" />
                              </colgroup>
                              <tbody>
                                 <tr>
                                    <td>Command line (long):</td>
                                    <td><code class="literal">--data-input</code> <em class="replaceable"><code>contentType</code></em>@<em class="replaceable"><code>port</code></em>=<em class="replaceable"><code>uri</code></em></td>
                                 </tr>
                                 <tr>
                                    <td>Command line (short):</td>
                                    <td><code class="literal">-d</code><em class="replaceable"><code>contentType</code></em>@<em class="replaceable"><code>port</code></em>=<em class="replaceable"><code>uri</code></em></td>
                                 </tr>
                                 <tr>
                                    <td>Ant task:</td>
                                    <td>For detailed information on how to specify input and output files in the Ant task,
                                       see <a href="antdesc.html#ant.input-and-output" title="Input and output files and filesets">Section 2.2, “Input and output files and filesets”</a> and <a href="antparamnest.html#ant.input" title="input">Section 4.1, “input”</a></td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                     </figure>
                     <p>If the port and uri do not contain an at sign, the contentType specification can be
                        left out. In this case the content type will be determined from the contents of the
                        URI.
                        If the content type cannot be determined from the contents of the URI, the content
                        type
                        is guessed from the URI name. If the content type cannot be guessed from the URI name,
                        it is set to "<code class="literal">application/octet-stream</code>". If you have to give an explicit
                        content type because the port or uri contain an at sign, but you don't know the content
                        type, you can set it to "<code class="literal">content/unknown</code>" which is the same as leaving
                        it out and will try to determine the content type from content or name.</p>
                     <p>If the detected or explicitly specified content type is equal to
                        <code class="literal">application/xml</code>, ends in <code class="literal">+xml</code>, starts with
                        <code class="literal">text/</code> or has a charset of <code class="literal">utf-8</code> specified,
                        the input is treated as text, otherwise the input gets base64 encoded automatically
                        before it is given to the pipeline.</p>
                     <p>If the uri does not contain an equals sign, the port specification can be
                        left out and the input will be applied to the primary non-parameter input port.</p>
                     <p>T.B.D.</p>
                  </div>
               </section>
            </div>
         </div>
         <div xmlns:tmpl="http://docbook.org/xslt/titlepage-templates" class="navfooter">
            <table width="100%" summary="Navigation table">
               <tr>
                  <td width="40%" align="left"><a title="15 .  Input" href="cfg.input.html"><img src="img/prev.png" alt="Prev" border="0" /></a> </td>
                  <td width="20%" align="center"><a title="XML Calabash Reference" href="index.html"><img src="img/home.png" alt="Home" border="0" /></a></td>
                  <td width="40%" align="right"> <a title="17 .  Output" href="cfg.output.html"><img src="img/next.png" alt="Next" border="0" /></a></td>
               </tr>
               <tr>
                  <td width="40%" align="left">15 .  Input </td>
                  <td width="20%" align="center"><a title="Chapter  4 .  Configuration" href="configuration.html"><img src="img/up.png" alt="Up" border="0" /></a></td>
                  <td width="40%" align="right"> 17 .  Output</td>
               </tr>
            </table>
         </div>
         <div xmlns:tmpl="http://docbook.org/xslt/titlepage-templates" class="copyrightfooter">
            <p><a href="dbcpyright.html">Copyright</a> © 2011–2020 Norman Walsh.</p>
         </div>
      </div>
   </body>
</html>